/**
 *====================================================
 * 文件名称: FinanceBulkstockActionApi.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2015年9月24日			chenxy(创建:创建文件)
 *====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.project.action.v1;

import java.util.List;
import java.util.Map;

import com.yuexunit.finance.context.FinVersion1;
import com.yuexunit.finance.project.action.v1.model.FinanceBulkstock;
import com.yuexunit.finance.project.action.v1.model.FinanceBulkstockPublic;
import com.yuexunit.finance.project.action.v1.model.output.ContainerInfos;
import com.yuexunit.finance.project.action.v1.model.output.ContainerInventory;
import com.yuexunit.finance.project.action.v1.model.output.ContainerInventoryHistory;
import com.yuexunit.finance.project.action.v1.model.output.ContainerInventoryImages;
import com.yuexunit.finance.project.action.v1.model.output.ContainerInventoryLog;
import com.yuexunit.finance.project.action.v1.model.output.ContainerInventoryTrackingDetail;
import com.yuexunit.finance.project.action.v1.model.output.PickupBulkstockInfo;
import com.yuexunit.page.PageCriteria;
import com.yuexunit.page.PageList;
import com.yuexunit.web.annotation.Action;
import com.yuexunit.web.annotation.Parameter;
import com.yuexunit.web.annotation.Permission;

/** 
 * @ClassName: FinanceBulkstockActionApi 
 * @Description: 融资货物管理
 * @author chenxy 
 * @date 2015年9月24日 下午4:14:40 
 */
public interface FinanceBulkstockActionApi {
	
	@Permission
	@Action(version = FinVersion1.class, description = "融资货物列表(自动补全列表可用)")
	public PageList<FinanceBulkstock> inquireFinanceBulkstockPageList(
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId,
			@Parameter(name = "keyword", description = "货物名称", nullable = true) String keyword,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
	
	@Action(version = FinVersion1.class, description = "质物公式列表")
	public PageList<FinanceBulkstockPublic> inquirePublicFinanceBulkstockPageList(
			@Parameter(name = "bulkstockName", description = "货物名称", nullable = true) String bulkstockName,
			@Parameter(name = "specification", description = "规格型号", nullable = true) String specification,
			@Parameter(name = "originPlace", description = "产地", nullable = true) String originPlace,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);

	//====================================================================================================//
	@Permission
	@Action(version = FinVersion1.class, description = "查询融资箱货列表-待放款的货箱")
	public List<ContainerInventory> inquireWaitLoanNoticeBulkstockInventoryList(
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询融资箱货列表-待放款的货箱")
	public PageList<ContainerInventory> inquireWaitLoanNoticeBulkstockInventoryPageList(
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询融资箱货列表-待运输通知的货箱")
	public List<ContainerInventory> inquireWaitTransportNoticeBulkstockInventoryList(
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询融资箱货列表-待配送的货箱")
	public List<ContainerInventory> inquireWaitDeliveryBulkstockInventoryList(
			@Parameter(name = "deliveryNoticeId", description = "放货通知ID") Long deliveryNoticeId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询融资箱货列表")
	public List<PickupBulkstockInfo> inquireBulkstockInventoryList(
			@Parameter(name = "enterpriseId", description = "融资企业ID", nullable = true) Long enterpriseId,
			@Parameter(name = "productType", description = "产品类型", nullable = true) Integer productType,
			@Parameter(name = "bulkstockName", description = "融资货物", nullable = true) String bulkstockName,
			@Parameter(name = "bulkstockInfoId", description = "融资货物Id", nullable = true) Long bulkstockInfoId,
			@Parameter(name = "warehouseName", description = "仓库名", nullable = true) String warehouseName
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询融资箱货列表")
	public PageList<ContainerInventory> inquireBulkstockInventoryPageList(
			@Parameter(name = "financeContractSerialNumber", description = "合同序列号", nullable = true) String financeContractSerialNumber,
			@Parameter(name = "enterpriseName", description = "融资企业名", nullable = true) String enterpriseName,
			@Parameter(name = "inventoryId", description = "货箱ID", nullable = true) Long[] inventoryIds,
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId,
			@Parameter(name = "waybillNumber", description = "运单号", nullable = true) String waybillNumber,
			@Parameter(name = "supervisionState", description = "监管状态", nullable = true) Integer[] supervisionState,
			@Parameter(name = "inventoryState", description = "货箱状态 0:全部/1:正常可提/2:提前提货/3:待赎货/4:待处置", nullable = true) Integer inventoryState,
			@Parameter(name = "caseNumber", description = "箱号", nullable = true) String caseNumber,
			@Parameter(name = "loanNoticeId", description = "放款通知单ID", nullable = true) Long loanNoticeId,
			@Parameter(name = "productType", description = "产品类型", nullable = true) Integer productType,
			@Parameter(name = "financeNumber", description = "融资单号", nullable = true) String financeNumber,
			@Parameter(name = "bulkstockName", description = "融资货物", nullable = true) String bulkstockName,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
	
//	@Permission
	@Action(version = FinVersion1.class, description = "查询融资货箱列表-融资信息页面中的状态")
	public PageList<ContainerInventory> inquireFinanceContainerInventoryPageList(
			@Parameter(name = "financeNumber", description = "﻿融资编号", nullable = true) String financeNumber,
			@Parameter(name = "beginDate", description = "﻿理货开始时间", nullable = true) String beginDate,
			@Parameter(name = "endDate", description = "﻿理货结束时间", nullable = true) String endDate,
			@Parameter(name = "waybillNumber", description = "物流运单号", nullable = true) String waybillNumber,
			@Parameter(name = "caseNumber", description = "箱号", nullable = true) String caseNumber,
			@Parameter(name = "enterpriseName", description = "﻿融资信息ID", nullable = true) String enterpriseName,
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId,
			@Parameter(name = "inventoryState", description = "货箱状态 0:全部/1:交割/2:到港/3:已提/4:可提/5:在押/6:异常", nullable = true) Integer inventoryState,
			@Parameter(name = "inventoryLockState", description = "﻿是否显示加锁状态", nullable = true) Boolean inventoryLockState,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
	
//	@Permission
	@Action(version = FinVersion1.class, description = "查询融资货箱列表-融资信息页面中的状态")
	public List<ContainerInventory> inquireFinanceContainerInventoryList(
			@Parameter(name = "caseNumber", description = "箱号", nullable = true) String caseNumber,
			@Parameter(name = "waybillNumber", description = "﻿运单号", nullable = true) String waybillNumber,
			@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true) Long financeId,
			@Parameter(name = "loanNoticeId", description = "放款申请ID", nullable = true) Long loanNoticeId,
			@Parameter(name = "pickupState", description = "提货状态 1 已提货 2 未提", nullable = true) Integer pickupState
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "通过箱号查询融资ID")
	@Parameter(name = "financeId", description = "﻿融资信息ID", nullable = true)
	public Long inquireFinanceIdBycontainer(
			@Parameter(name = "caseNumber", description = "箱号") String caseNumber,
			@Parameter(name = "waybillNumber", description = "﻿运单号") String waybillNumber
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "铅封号扫描获取融资货箱")
	public List<ContainerInventory> inquireFacingSlipContainerInventoryList(
			@Parameter(name = "facingSlip", description = "铅封号") String facingSlip
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询融资箱货明细(货箱信息)")
	public ContainerInventory inquireBulkstockInventoryDetail(
			@Parameter(name = "inventoryId", description = "﻿货箱ID") Long inventoryId
	);
	
	@Action(version = FinVersion1.class, description = "查询融资箱货图片信息")
	public ContainerInventoryImages inquireInventoryImages(
			@Parameter(name = "waybillNumber", description = "﻿运单号") String waybillNumber,
			@Parameter(name = "caseNumber", description = "﻿箱号") String caseNumber
	);
	
	@Action(version = FinVersion1.class, description = "查询融资箱信息")
	public List<ContainerInfos> inquireContainerInfos(
			@Parameter(name = "waybillNumber", description = "﻿运单号", nullable = true) String waybillNumber,
			@Parameter(name = "enterpriseId", description = "﻿企业ID", nullable = true) Long enterpriseId,
			@Parameter(name = "enterpriseName", description = "﻿企业ID", nullable = true) String enterpriseName
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询融资箱货物流明细")
	public ContainerInventoryTrackingDetail inquireContainerInventoryTrackingDetail(
			@Parameter(name = "inventoryId", description = "﻿货箱ID") Long inventoryId
	);
	
	@Action(version = FinVersion1.class, description = "查询融资箱货物流明细")
	public ContainerInventoryTrackingDetail inquireFinanceContainerInventoryTrackingDetail(
			@Parameter(name = "financeNumber", description = "﻿融资编号", nullable = true) String financeNumber,
			@Parameter(name = "waybillNumber", description = "﻿运单号") String waybillNumber,
			@Parameter(name = "caseNumber", description = "﻿箱号", nullable = true) String caseNumber
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "变更融资箱的物流运单号")
	public void updateContainerInventoryWaybillNumber(
			@Parameter(name = "inventoryId", description = "﻿货箱ID") Long[] inventoryId,
			@Parameter(name = "waybillNumber", description = "物流运单号") String waybillNumber
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询历史货箱列表")
	public List<ContainerInventoryHistory> inquireFinanceContainerInventoryHistoryList(
			@Parameter(name = "caseNumber", description = "箱号", nullable = true) String caseNumber,
			@Parameter(name = "waybillNumber", description = "物流运单号", nullable = true) String waybillNumber
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询无融资货箱列表")
	public List<ContainerInventoryHistory> inquireEmptyFinanceContainerInventoryHistoryList(
			@Parameter(name = "waybillNumber", description = "物流运单号") String waybillNumber,
			@Parameter(name = "caseNumber", description = "箱号", nullable = true) String caseNumber
	);

	@Permission
	@Action(version = FinVersion1.class, description = "查询历史货箱")
	public ContainerInventoryHistory inquireFinanceContainerInventoryHistory(
			@Parameter(name = "inventoryHistoryId", description = "货箱清单ID", nullable = true) Long inventoryHistoryId
	);
	
	@Action(version = FinVersion1.class, description = "改单、拆单")
	public Map<String,String> changeBill(
			@Parameter(name = "originalNumber", description = "﻿原运单号") String originalNumber,
			@Parameter(name = "type", description = "操作类型1:改单，2：拆单") String type,
			@Parameter(name = "newNumbers", description = "新运单号") String newNumbers,
			@Parameter(name = "Key", description = "验证Key") String Key
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询货箱动态")
	public List<ContainerInventoryLog> inquireContainerInventoryLogList(
			@Parameter(name = "inventoryId", description = "货箱ID") Long inventoryId
	);
	
	@Action(version = FinVersion1.class, description = "新增货箱动态")
	public void createContainerInventoryLog(
			@Parameter(name = "caseNumber", description = "箱号") String caseNumber,
			@Parameter(name = "operator", description = "操作人") String operator,
			@Parameter(name = "remark", description = "备注") String remark
	);
}
